/* eslint-disable */
// @ts-ignore
import request from '@/utils/http';

import * as API from './types';

/** 删除任务 POST /task/info/delData */
export async function taskInfoDelDataUsingPost({
  body,
  options,
}: {
  body: API.TaskInfoBoTaskInfoDelData;
  options?: { [key: string]: unknown };
}) {
  return request<API.RBoolean>('/task/info/delData', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 获取任务详情 POST /task/info/getData */
export async function taskInfoGetDataUsingPost({
  body,
  options,
}: {
  body: API.TaskInfoBoTaskInfoGetData;
  options?: { [key: string]: unknown };
}) {
  return request<API.RTaskInfoVo>('/task/info/getData', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 分页查询任务 POST /task/info/pageData */
export async function taskInfoPageDataUsingPost({
  body,
  options,
}: {
  body: API.TaskInfoBoTaskInfoPageData;
  options?: { [key: string]: unknown };
}) {
  return request<API.RPageDataVoTaskInfoVo>('/task/info/pageData', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 添加活动任务 POST /task/info/saveData */
export async function taskInfoSaveDataUsingPost({
  body,
  options,
}: {
  body: API.TaskInfoBoTaskInfoSaveData;
  options?: { [key: string]: unknown };
}) {
  return request<API.RLong>('/task/info/saveData', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 修改任务 POST /task/info/updateData */
export async function taskInfoUpdateDataUsingPost({
  body,
  options,
}: {
  body: API.TaskInfoBo;
  options?: { [key: string]: unknown };
}) {
  return request<API.RBoolean>('/task/info/updateData', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}
